#!/bin/sh

TDIR="`dirname "${0}"`"
BASEDIR="${TDIR}/.."
. "${BASEDIR}/functions"

for badopt in nosuchfile /dev/null /dev/zero
do
  ${TOP_BUILDDIR}/modules/acct_rtcp_hep/rtcp2json_test ${badopt}
  reportifnotfail "Testing bad option: ${badopt}"
done

for t in rtcp1
do
  ${TOP_BUILDDIR}/modules/acct_rtcp_hep/rtcp2json_test ${TDIR}/${t}.raw > ${t}.output
  report "decoding ${t}.raw"
  ${DIFF} ${t}.output ${TDIR}/${t}.output
  report "checking ${t}.output"
done

